home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 2
/
AACD 2.iso
/
AACD
/
Programming
/
NRCOBOL1g
/
NRCOBOL.readme
< prev
next >
Wrap
Text File
|
1999-06-17
|
31KB
|
777 lines
NRcobol Version 1.0f by cHArRiOTt March 99
1.Introduction
2.Installation
3.Usage
4.Syntax
5.Implemented?
6.History
7.Todo
8.Bugs
9.Feedback
10.Contacts
11.Distribution
12.Credits
13.Disclimer
14.Apologies
15.Thanks
16.finally
NUff REsPEct.....peace n more time.
-------------------------------------------------------------------------
1.Introduction ...Why COBOL?
To those of you thinking not another new language, COBOL is in fact one
of the oldest high-level languages, its roots going back to the late
1950's. Ofcourse there are those of you who already know this but regard
COBOL as not so much an high-level language, as the original computer
virus. To these people i say RESPECT the source of the mother tounge. (sic!)
When so many languages have come and gone (what ever happended to
Modulus II, and who outside of the Amiga community has heard of 'E;), COBOL
(with the most source code on the planet, circa 89) has seen in the advent
of STRUCTURED,and now OBJECT methodologies, its adapted absorbing the latest
in Database Management, SQL etcetera, and gone on from strength to strength.
Indeed as an introduction to records there's alot to be said in its favour.
So when people say why, i say why not?
This implementation of COBOL is largely ANSI 85 compatable and takes the
form of MicroSoft(TM) COBOL, with maybe the exception of some stuff in
ENVIRONMENT DIVISION - SPECIAL-NAMES. And some stuff left over from the days
when memory was premium and no one had the imagination to contemplate speed.
see Implementation?
This would have been bought to you sooner, if it weren't for the moron, in
the bedsit down stairs, with something of an habit!! which in lean times
even extend to a fixation with gas. 'would you adam n eve it'.
WARNING dope really @&*$% you up! something to do with short term memory
going to pot!
STOP THE PRESS!.
"COMPUTING" MAY 8th 97
'Cobol crisis looms' The skills cris is luring Cobol programmers out of
retirement with offers of up to £1000 ($1700) per day...... hmm :-)
-------------------------------------------------------------------------
2.Installation
Nothing could be simpiler, Just copy the runtime program 'RUNCOB' anywhere
in your path, that's ram: c: or in the same directory as the created .INT
files.
Files with the extension .INT are created as a result of successfully
running NRCOBOL ..see Usage
There are several ToolTypes which you'll need to tailor to suite your
system. To access these single click on the icon of NRCOBOL, then select
information from the sysem menu to find the following:
TEXTEDITOR=C:ed
edit cobol source file.
TEXTVIEWER=sys:utilities/multiview
view list / debug files, if not set then the editor set for TEXTEDITOR
is used.
SOURCEDIR=
where cobol source files are to found by NRCOBOL's requester
RUNCOBDIR=
where runcob prog is to be found, default ram: c: or current directory
Note: the absence of a space after the '=' and in the case of SOURCEDIR
and RUNCOBDIR if a directory is stated it should end with ':' or '/'
To avoid those moments of head scratching, you are advised to use ABSOLUTE
path names. see.. 15.Thanks
If you are one the few who haven't yet discovered 'UrouHack' by Tinic Urou
then i urge you to get hold of a copy aminet util/wb. This prog redefines
the system gadgets to very impressive xen like gadgets and leaves the rest
of the system looking like MUI, and then some, without slowing the system
down. If that's not reason enough, it also improves the appearence of this
prog :)
-------------------------------------------------------------------------
3.Usage
After creating your cobol source file with your favourite text editor,
and saving it with the .COB extention you have a choise of evoking the
compiler from CLI/shell or Workbench.
From CLI/SHELL
NRCOBOL <sourcefile>.(COB | CBL) [-l] [-d] [-e] [-r]
where the optional flags:
-l produces a simple listing <sourcefile>.LST
-d produces a debug listing <sourcefile>.DBG
-e errors will terminate compilation. [wildcard option]
-r Report file '.NRCOBOL.report' OFF. [wildcard option]
The wildcard pattern match option will now recognize #?.(cob|cbl)
A successfull compilation produces <sourcefile>.INT
to run type... RUNCOB <sourcefile>.INT
From Workbench
Use of the program from workbench is self explanatory, but for those
too dim.
+-----------------------------------------------+
| [.][#]
|+--------------------------------------------+-|
||Titles || | <-- What When Who
|| || |
|| || |
|+-------------------------------------------+| |
|File: | || | <-- current sourcefile.COB
| +-------------------------------------+| |
|____________________________________________ | |
|| || |
|| IDENTIFICATION * || | <-- status block
|| ENVIRONMENT * || | *'s replaced by
|| DATA * || | PASSED or FAILED
|| PROCEDURE * || |
|| || |
|| || | <-- current line
|+-------------------------------------------+| |
|+--------+ +-+ +---+ +--+ +------+| | <-- ancillary output files
|| | | | List +---+ Debug +--+ | || | as .LST and/or .DBG
||COMPILE | |>| +--------+ +--------+ |EDITOR|| |
|| | | | | ABORT | | RUN! | | ||_|
|+--------+ +-+ +--------+ +--------+ +------+|=|
+---------------------------------------------+-+
^ ^ ^
| | |
| | Edit sourcefile.COB/LST/DBG
| filerequester
Make it so #1
The Editor option allows one to view sourcefile.COB, sourcefile.LST or
sourcefile.DBG. The file editor defaults to 'ED' as supplied in sys:c.
You can however, set TEXTEDITOR in NRCOBOL's icon to launch your favourite
editor. eg TEXTEDITOR=c:ced . Note no space between = and editor named.
see.. 2.Installation
The menu options allow:
1, A window on a custom screen, ie high resolution non interlace or
a window on the current public screen.
2, The date check on debug/listing files can to be disabled,
ie, open the last debug/listing file related to current cobol source file,
regardless of the date on the source file.
3, Terminal runtime check on SIZE ERROR condition.
4, ditto for OVERFLOW ERROR.
5, Remembers the current directory, the next time you use NRCOBOL.
6, switch zone check from error to non terminal warnings
For those of you looking to automate compilation, possibly using
Arexx, the following codes are now returned by NRCOBOL:
8000 nrcobol ? called
8001 filename error
8002 compilation error
8003 savefile error (.int or T:debug_) file
8004 identifier limits
8005 too many files found with wildcard. [500 max]
1002 memory error
In both cases an ICON is produced named <sourcefile>.INT
to execute just double click.
The debug option produces a file which you may find useful in locating
runtime errors, which sadly is normal for cobol. Usually this is to do with
uninitialised variables, you know, finding alpha data in a numeric field.
Runtime errors usually return a value in the form 0x????, where 0x???? is an
offset into the data space allocated in the Data Division. Stradling values,
ie value between offset values indicates a postion within a table,
(a subsripted identifier).
-------------------------------------------------------------------------
4.Syntax
I may at a later date add the syntax, in the mean time the following
books are recomended:
- COBOL for the IBM Personal Computer by kip R Irvine
- COBOL for the 80's by J Wayne Spence
- Structured Programming in COBOL by B J Holmes
- COBOL 85 for programmers by Jim Inglis
- COBOL for students, fourth edition by Andrew Parkin
Richard Yorke
OK go on then..
-------------------------------------------------------------------------
OK go on then.. The basics.
In Every Dam Program there are four division.
INTRODUCTION DIVISION.
PROGRAM-ID. <>.
ENVIRONMEMT DIVISION.
DATA DIVISION.
PROGRAM DIVISION.
ACCEPT ADD CALL CANCEL
CLOSE COMPUTE CONTINUE DELETE
DISPLAY DIVIDE EVALUATE EXIT
GO IF INITIALIZE INSPECT
MERGE MOVE MULTIPLY OPEN
PERFORM READ RELEASE RETURN
REWRITE SEARCH SET SORT
START STOP STRING SUBTRACT
UNSTRING USE WRITE
ENTRY
-------------------------------------------------------------------------
4a.ACCEPT
ACCEPT idetifier FROM {DATE |DAY |TIME |DAY-OF-WEEK |INTEGER-OF-DATE |INTEGER-OF-DAY |AMIGA-BUTTON}.
DATE YYMMDD
DAY YYDDD
TIME HHMMSShh
DAY-OF-WEEK D sunday == 0
INTEGER-OF-DATE YYYYMMDD
INTEGER-OF-DAY YYYYDDD
TODAYS-DATE YYMMDD
AMIGA-BUTTON
ACCEPT *screenrecord ON ESCAPE imperitive(s).. .
*screenrecord as defined by MicroSoft(TM) Cobol 2.xx
-------------------------------------------------------------------------
5.Implemented?
IDENTIFICATION DIVISION.
The program-id is required to be the same as the filename bar the
.COB file extention. This allows for consistent CALLs to subprogram
and nested programs ie via their program-ids.
ENVIRONMEMT DIVISION.
The only options supported in SPECIAL-NAMES are CURRENCY and DECIMAL-POINT.
I-O-CONTROL SECTION. recodnised but not implemented!
To read a record file created in a text editor, specify ORGANIZATION IS
LINE SEQUENTIAL. If you are unfotunate enough to have created your record
file with a PC editor, dont forget to convert the file to amiga (CrossDOS etc),
or adding an extra character to the record definition, to account for the PC's 'LF' .
DATA DIVISION.
There is no support for the REPORT SECTION or communications.
BLOCK and RECORD clauses recodnised but not implemented!
USAGE IS default always ie no support yet for PACKED / BINARY etc..
SYNCHRONISED is recodnised but not implemented!
SCREEN SECTION is as defined by Microsoft 2.XX , plus support for basic
BUTTON GADGETS.
PROGRAM DIVISION.
All keywords above have been implemented!
-------------------------------------------------------------------------
6.History
1.00 July 97 - first release CU Amiga Magazine
1.0a August 97 - Aminet / CU Amiga Magazine (CDROM 15) RIP!
resort to pre 'reference moddification' version, since
last minute addition of reference modification option
introduced strange/terminal errors ...sorry!
1.0b November 97 - font sensitive main program
NRCOBOL compiled under GNU C 270 ,just!
still trying with runcob (NorthC1.3 + A68k)
support only for A1200 or better
...unless i get feedback from pre A1200 users :)
MOVE ALL ...
HIGH-VALUE(S) LOW-VALUE(S) sign sensitive
blank when zero should now work
fixed oversight with full stop now allowed in zone/margine A
relaxed LEVEL 02-49 positioning, now allowed in zone/margine A
Amiga Format Magazine's CDROM (106 ;)
1.0c February 98 - NRCOBOL + RUNCOB compiled under DICE 3.15 ,all as 68000
fixed PERFORM inline/times options
fixed justification
fixed SIZE ERROR handling
extended post statement error clause
eg
ON SIZE ERROR
imperative...
NOT ON SIZE ERROR
imperative...
END-???
now available for:
AT EOP
AT END
INVALID KEY
ON SIZE ERROR
ON EXCEPTION
ON OVERFLOW
fixed ASSIGN TO " "
now mutualy exclusive to VALUE OF FILE-ID IS " "
see.. 15.Thanks
extend of ACCEPT funtion to include ansi89 like :) functions
for millennium date
INTEGER-OF-DATE YYYYMMDD
INTEGER-OF-DAY YYYYDDD
added support for AMIGA-BUTTON gadget
see.. 4a.ACCEPT
added tooltypes for:
TEXTVIEWER
SOURCEDIR
RUNCOBDIR
improved GUI to indicate option available
see.. 15.Thanks
WB1.3 compatable compilation back by demand
1.0d March 98 - fixed terminale oversite with cli interface sorry!(
added TODAYS-DATE to ACCEPT function.
see.. 15.Thanks
Amiga Format Magazine's CDROM (110, AFCD26 thanks guys!;)
1.0e Sept 98 - reference modification now implemented ...Halleluiah!!
'P' option for PICTURE declaration done
multiple PICTURE declaration, ie s9(5)v9(3)
level 78's ,ie pseudo constants done (MC Shaun)
better implementation of edited_number and edited_string
basic menu options
GO TO ....DEPENDING fixed
INSPECTING ...converting clause done
'.cbl' now allowed as sourcefile extension
wildcard for bulk compilation from cli done
compilation speed improvements +300% smoking!
new runcob tooltype for WINDOW=PUBLIC / CUSTOM via menu
ROUNDED option fixed
figurative constants now allowed with conditions
precedence of section and paragraph names in PERFORM fixed
empty PERFORMS allowed :) PERFORM ...[1000000] TIMES
+ fine tuning of assembler maths routines
Amiga Format Magazine's CDROM (118, AFCD34)
1.0f March 99 - Qualified identifiers, ie 'ident IN record OF record' is now
implemented. This means the really useful feature CORRESPONDING
option for MOVE, ADD and SUBTRACT now works. Qualified identifiers
for 'nested files' is pending.
Improved memory management now means NRCOBOL release
memory between compilation. All the better for wildcards :)
Report file '.NRCOBOL.report' generated when the wildcard option
is used. Use -r flag to suppresse file.
The following have been rewritten to meet Ansi 85:
ADD, COMPUTE, DISPLAY, DIVIDE, EVALUATE, GO, INITIALIZE,
INSPECT (almost !), MOVE, MULTIPLY, PERFORM, SEARCH, SET, STRING,
SUBTRACT and UNSTRING.
Improvements have been made to complex and abreviated conditions.
Level 78 style constants have been expanded to simple integer
arithmetics, the operators are + - / * ,no presidence, no brackets.
integers greater than 4294967295, 2^32 -1 , are truncated, just
like microFocus(tm).
A limited subset of compiler directives have been implemented.
please note stack requirements are now a little higher this
largely to deal with the worst case of a rather neat O(logn),
but memory hungry recursive division routine.
for any really silly coders out there, the complex form of the
continuation has been implemented. This allows even keywords to be
interupted, provided the next line starts with an hyphen.
NRCOBOL will now compile source code prepared on a PC without the
need for conversion via crossdos etc.
upgraded from OS 2.4 to OS 3.0, just so i could get exec's CreatePool()
to compile.
On the GUI front, NRCOBOL will now remember where it was, when last
closed.
There is also a menu flag to remember the current dir, this info is
recorded in a small file 'NRCOBOL.pref' in the S directory, when the
program is closed.
You can also switch off zone check. I am told this makes the language
more friendly, personaly i think it allows sloppy habits. X)
The overflow error condition is now optioned.
Finally, for those in the know the ENTRY satatement has been implemented.
This microFocus(tm) feature allows library like calls to resident
programs.
1.0g June 99 - For Evaluation see... Debug environment,
changes to the position-clause of both @{" ACCEPT " link "ACCEPT" 0} and @{" DISPLAY " link "DISPLAY" 0}
see.. Thanks
88 level allowed in File Section.
Fix for REWRITE of sequential organized files.
Improvements to USE(s) in the DECLARATIVES SECTION.
*> comment marker now allowed.
Improvements made to all keywords related to SEQUENTIAL organised files.
FD's LINAGE clause and LINAGE-COUNTER implemented.
Font sensitive runtime screen added via menu option, user required to
'clean' screen/line after use of ACCEPT.
Large screen format 132 x 48 now supported.
Rewrites to file related syntax, variable size records now supported.
General improvements to SEQUENTIAL, RELATIVE and INDEXED FILE formats.
File Status codes now meets ANSI 85 specification.
-------------------------------------------------------------------------
7.Todo
- font sensitive runtime screen,
this option would already have been if only i could work out
how to add and remove button /string gadgets to an open window
on the fly, using 'gadtools' can anyone help??
- own rather than system input, ditto!
- Totally ANSI 85 see Implemented?
- Intrinsic functions ANSI 89
- support for SQL trainer module, possible interface to Hughe's MSQL
can anyone say how SQL reports to cobol after EXEC SQL commands
COBOL <> SQL overview welcomed.
- OBJECT????? Hmmmm :-)
- Trace facility ...is this defined by ansi??
- expand ACCEPT functionality (Amiga specific)
- expand guide's introduction to cobol syntax
- possible allow cobol's CALL command to access dos commands, is this legal?
-------------------------------------------------------------------------
8.Bugs
- Requires A1200 or better ;0
DICE m68020 compilation.
-------------------------------------------------------------------------
9.Feedback
- 'things aint wot they ougt a'
- unexpected output or syntax ... well you never know
- congratulations
- bribes not to continue
- buy outs / takeovers
- Donations of money / hardware ;-)
- or even a post card from what ever part of the planet you and your
Amiga reside. Amiga dead? Long live Amiga.
- OBJECT COBOL example code???
- Spare copy of latest ANSI COBOL standard??
this comes via limited access to Ansi74 plus the stuff at the back
of most books on COBOL + pdf files available via http://www1.shore.net/~daschric/j4.htm
- Offers of work :-(
- have you any cobol source you're proud of, and would like included with
the next release?
email : HA.ROT@bigfoot.com (re-router/lifetime email curtesy of
http://WWW.bigfoot.com/)
snail mail
Mr C Harriott
14a Splott Road
Splott
Cardiff
Cf2 2BZ
UK
-------------------------------------------------------------------------
10.Contacts
For further information on the COBOL scene you might try the FAQ
created and maintained by
jfid@mfltd.co.uk (James Fidell)
http://www.mfltd.co.uk/~jfid/
http://wwww.cobol.com/
http://www.netcom.com/~wmklein/cobolfaq.htm
http://www1.shore.net/~daschric/j4.htm
http://www.dkuug.dk/JTC1/SC22/WG4/
news:comp.lang.cobol
-------------------------------------------------------------------------
11.Distribution
Distribution is granted to anyone via floppy and internet/ BBS provided
documentation remains as is, only a nominal fee is charged for copying
and no attempt is made to reverse engineer the program.
Distribution is also granted to anyone compiling a CDROM provided the
above conditions are met AND i am sent a copy of the CDROM. Please??
You may also like to consider this product, "Magazine Ware".
This means if you find this program useful you may send me an issue of
a recent magazine you consider 'interesting', 'very interesting' or even
'Wow, is that for real?' :)
I would be particularly interested in magazines on the global phenomena
that is 'StarWars' or really interesting scientific(tion) journals.
All this for the price of a stamp? Go on you know you want to!
-------------------------------------------------------------------------
12.Credits
Would you belive i wrote this with the public domain 'C' compiler
NorthC 1.3 ...if you're out there S Hawtin thanks dude. Although i have to
say it makes for lazy programing. Hopefully GNU C will induce disipline!
Ouch!
Thanks expressed to Thore Böckelmann for the use of his disclimer (quite
frankley i couldn't have put it better myself) also thanks for gifting
the Amiga community his EXCELENT CyberAVI and CyberQT. A real babe of a
program. SHwing?? Now how about some avi/mov files AF/CUCD/ANOther?
Thanks to Markus Hillenbrand for that excellent GUI program GUICreator,
which was used to create (after much tweeking) the newface of NRCOBOL.
Please note the difference in compilation speeds is due solely to the use
of gadtools.
Its amasing the people we take for granted, like that bloke Tinic Urou
who wrote that glorious piece of eye candy called UrouHack, if you havent
installed it yet what are you waiting for.
Thanks also to those unknown warriors who gave their all to bring us the
freedom to program in assembler.. the authors of A68K and BLINK
without which..... RESPECT!
-------------------------------------------------------------------------
13.Disclimer
No warranty, either express or implied, is made with respect to the fitness or
merchantability of NRCOBOL.
cHArRiOTt (referred to as "the author"), reserves the right to not
develop any future versions of NRCOBOL.
The author will try to make a good faith attempt at correcting any problems if
any are discovered, but is in no way required, nor bound to correct them.
The author neither assumes nor accepts any responsibility for the use or misuse
of these programs. He will also not be held liable for damages or any
compensation due to loss of profit or any other damages arising out of the use,
or inability to use this program.
The author will not be liable for any damage arising from the failure of this
program to perform as described, or any destruction of other programs or data
residing on a system attempting to run the programs.
The user of this program uses it at his or her own risk.
-------------------------------------------------------------------------
14.Apologies 18/9/97
My apologies to anyone who tried and failed to make contact at my old email
address. At around 18th september my account was suddenly and without warning
terminated. Imagine my suprise to find i no longer exist, to find my account fini,
to find this parrot's dead. No longer on this mortal coil, no longer
with us, gone to software heaven, frankly needing more than a magnetic medium
to get in touch with our dearly departed data :(( KO'ed at HQ by HO.
This ment not only the loss of pending email, but records on
all contacts made to date. If that wasn't bad enough, i had just, that week,
been published on the CDROM of the CU Amiga magazine (CUCD15), which ment all
those potential contacts are now lost.
Anyway, due to an act of devine intervention( new JAVA course), i am now back on
line. Existing from day to day, suddenly aware of my own mortality, unsure of the
integrity of the system, but gradualy rekindling my trust... bare with me.
Willing to forgive but never forget!
If you were one of those who tried and failed, ...do call again y'all :*)
-------------------------------------------------------------------------
15.Thanks
Special thanks to the following who have made contact, and are fondly remembered:
Groetjes, JAVE. ...pointing out fullstop zone error resulting in
bad compilation of paragraph/section names less then 4 characters
request for relaxation of level 02-49 zone 'B' done!
...microFocus COBOL85 info? still treading water?)
Charles Elliott ...still beta testing? trace environment directives?
Claus Luethje ...offer of docs, nice to know my prog, from its humble origins
has found such a grand home. Wow the stuff dreams are made of !))
Alan W Rateliff II ...alerting me to the ASSIGN TO "file-named"
Shawn D. Kelly ...for requesting the TOOLTYPES TEXTVIEWER,SOURCEDIR and RUNCOBDIR
and changes to the GUI.
Ron Copley ...Who actually uses the 'big-iron compilers' looking forward to your
offer of docs.
Loren Wilton ...Detailed debug , cli crash
Fahiem Wagiet ...Rainbow person in the New Rainbow Land , viva
Shaun C. Murray ...for obvious encouragement with this project ;)
requesting level 78's and public window, asking for
relaxed zone check, ENTRY + compilation directives.
Thanks for the posting on comp.lang.cobol
Francois Landry ...yep!
Matti Niskanen ...only Amiga makes it possible,
Saul Bertuccio ...Thanks for the excellent CED Arexx macros
saulbertuccio@usa.net Feedback welcomed
Happy new year! ..see /extra/CED.support/
Frank Reibold ...Try the Perform empty-perform 1000000 times now!)
Davide Zipeto ...GoldEd anyone ..see /extra/GoldEd.support/
powerstack ?? ...linux-stuff? phoee! Only Amiga makes it posible.
what size screens are you using .try sep scr 4 curs
David C. ...Out there in city de Banks, Bham Alabama-usa, watch u
think of me now? ps dont u mean WRITE blurb AFTER 2 lines :)
Sigurd Decroos ...for requesting changes to DISPLAY position-clause.
now VAX and ALPHA VMS systems complient ;)
Also requested Fat Screen option.
David M.Bebber ...Requesting further info on runtime error.
i am afraid the rest of you went down with the great crash :((
....do call again! Peace n more time!
-------------------------------------------------------------------------
16.finally
Since 'nrcobol1d' i have compleated the collage course which allowed
me access to the internet, and as im quit sure they are not going to
allow me a freebee access (them's the rules), i have had to resort
to Hotmail. This service curtesy of www.juno.com/ should allow free
email via my local cyber cafe.
Anyway for now keep using the 'HA.ROT@bigfoot.com' address which has
been configured to re-route emails to my old collage email address and
the new freebee hotmail address 'harriottc@hotmail.com'.
please note with the improvements to the program, the status of NRCOBOL
has changed from "Postcard ware" to "Magazine ware" 8^)
see ... 11.Distribution
-------------------------------------------------------------------------
'yep, it's so much more...jealous?'